# %%
import sys
import getopt
import argparse

# %%
def main(argv):
    
    params={"accessKey":'',"secretKey":'',"bucket":'',"endpoint":'',
    "numClients":'',"numSamples":'',"objectNamePrefix":'',"objectSize":''}


    help="MyS3Bench.py\n\
    --accessKey=<Access Key>\n\
    --accessSecret=<Secret Key>\n\
    --bucket=<Bucket Name>\n\
    --endpoint=<IP:PORT>\n\
    --numClients=<Num Of Clients>\n\
    --numSamples=<Num Of Samples>\n\
    --objectNamePrefix=<Object Name Prefix>\n\
    --objectSize=<Size Of Object>"

    try:
        opts, args = getopt.getopt(argv,"h",["accessKey=","secretKey=","bucket=",
        "endpoint=","numClients=","numSamples=","objectNamePrefix=","objectSize="])
    except getopt.GetoptError:
        print("Error Arguments! The help is folloing:")
        print(help)
        sys.exit(-1)
    for opt,arg in opts:
        if(opt)=='-h':
            print(help)
            sys.exit(0)
        else:
            print(opt)

# %%
if __name__ == "__main__":
   main(sys.argv[1:])
else:
   argvs=['--accessKey=hust', '--secretKey=hust_obs', '--bucket=loadgen', '--endpoint=http://127.0.0.1:9090', '--numClients=8', '--numSamples=256', '--objectNamePrefix=loadgen', '--objectSize=1024']
   main(argvs)

# %%



